#!/bin/csh -fx
#
#Shell script for building and installing Emacs.

set EMACS=/usr/local/emacs
set BIN=/usr/local/bin

(cd etc; make) || exit 1
(cd src; make) || exit 1

if mv `pwd` $EMACS;then
else
 mkdir $EMACS
 tar cf - . | (cd $EMACS; tar xfp -)
 rm -rf *
fi

cp $EMACS/etc/{ctags,etags} $BIN
mv $EMACS/src/xemacs $BIN/emacs
rm $EMACS/src/temacs
chmod 777 $BIN/{ctags,etags,emacs}
